<template>
<!--  登录页面-->
  <div class="login-view">

    <div class="login" id="login" v-loading="waiting">
      <div class="mb-2">爱心助公益平台</div>
      <!-- 背景图 -->
      <div class="log-bg">
      </div>
      <div>
        <div>
          <!--密码登录-->
          <div class="log-email">
            <input type="text" placeholder="请输入手机号" :class="'log-input' + (account==''?' log-input-empty':'')"
                   v-model="uphone">
            <input type="password" placeholder="请输入密码" :class="'log-input' + (password==''?' log-input-empty':'')"
                   v-model="upassword">
            <a href="javascript:" class="log-btn" @click="doLogin()">确认登录</a>
          </div>
        </div>
        </div>
      </div>
    </div>
<!--  <div>-->
<!--    <label for="uname">用户名：</label>-->
<!--    <input id="uname" type="text" v-model="uphone">-->
<!--    <br>-->
<!--    <label for="upwd">密码：</label>-->
<!--    <input id="upwd" type="text" v-model="upassword">-->
<!--    <br>-->
<!--    <button @click="doLogin()">登录</button>-->
<!--  </div>-->
</template>

<script>
import doThis from "@/api/getData";
export default {
  name: "LoginVue",
  data(){
    return{
      uphone:'',
      upassword:''
    }
  },
  mounted() {
  },
  methods:{
    doLogin(){
      doThis.doGet('/user/login',{uphone:this.uphone,upassword:this.upassword})
          .then(res=>{
            console.log('admin登录返回',res.data)
            let token=res.data
            localStorage.setItem("token",token)
            this.$router.push('/admin/UserList')
          })
    }
  }
}
</script>

<style scoped>
.mb-2{
  font-size: 60px;
  /*font-style:  oblique;*/
  font-family: 叶根友毛笔行书简体;
  margin: 5px auto;
  text-align: center;
}
.login-view {
  width: 100vw;
  height: 100vh;
  background-image: url(../../assets/大背景.png);
  background-size: cover;
}
.login {
  position: fixed;
  overflow: hidden;
  left: 50%;
  margin-left: -250px;
  top: 50%;
  margin-top: -350px;
  width: 500px;
  min-height: 555px;
  z-index: 10;
  right: 140px;
  background: #fff;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  -webkit-box-shadow: 0px 3px 16px -5px #070707;
  box-shadow: 0px 3px 16px -5px #070707
}
.log-close {
  display: block;
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 1;
}
.log-close:hover .icons {
  transform: rotate(180deg);
}
.log-close .icons {
  opacity: 1;
  transition: all .3s
}
.log-cloud {
  background-image: url(../../assets/大背景.png);
  width: 63px;
  height: 40px;
  position: absolute;
  z-index: 1
}
.login .cloud1 {
  top: 21px;
  left: -30px;
  transform: scale(.6);
  animation: cloud1 20s linear infinite;
}
.login .cloud2 {
  top: 87px;
  right: 20px;
  animation: cloud2 19s linear infinite;
}
.login .cloud3 {
  top: 160px;
  left: 5px;
  transform: scale(.8);
  animation: cloud3 21s linear infinite;
}
.login .cloud4 {
  top: 150px;
  left: -40px;
  transform: scale(.4);
  animation: cloud4 19s linear infinite;
}
.log-bg {
  background: url(../../assets/微信截图_20230810094154.png);
  background-size: cover;
  width: 100%;
  height: 312px;
  overflow: hidden;
}
.log-logo {
  height: 80px;
  margin: 120px auto 25px;
  text-align: center;
  color: #ffeb73 /* #1fcab3 */;
  font-weight: bold;
  font-size: 40px;
}
.log-text {
  color: #57d4c3;
  font-size: 13px;
  text-align: center;
  margin: 0 auto;
}
.log-logo, .log-text {
  z-index: 2
}
.icons {
  background: url(../../assets/大背景.png) no-repeat;
  display: inline-block;
}
.close {
  height: 16px;
  width: 16px;
  background-position: -13px 0;
}
.login-email {
  height: 17px;
  width: 29px;
  background-position: -117px 0;
}
.log-btns {
  padding: 15px 0;
  margin: 0 auto;
}
.log-btn {
  width: 402px;
  display: block;
  text-align: left;
  line-height: 50px;
  margin: 0 auto 15px;
  height: 50px;
  color: #fff;
  font-size: 13px;
  -webkit-border-radius: 5px;
  background-color: #3B5999;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  position: relative;
}
.log-btn.tw {
  background-color: #13B4E9
}
.log-btn.email {
  background-color: #50E3CE
}
.log-btn:hover, .log-btn:focus {
  color: #fff;
  opacity: .8;
}
.log-email {
  text-align: center;
  margin-top: 20px;
}
.log-email .log-btn {
  background-color: #50E3CE;
  text-align: center;
}
.log-input-empty {
  border: 1px solid #f37474 !important;
}
.isloading {
  background: #d6d6d6
}
.log-btn .icons {
  margin-left: 30px;
  vertical-align: middle;
}
.log-btn .text {
  left: 95px;
  line-height: 50px;
  text-align: left;
  position: absolute;
}
.log-input {
  width: 370px;
  overflow: hidden;
  padding: 0 15px;
  font-size: 13px;
  border: 1px solid #EBEBEB;
  margin: 0 auto 15px;
  height: 48px;
  line-height: 48px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
}
.log-inputa {
  width: 290px;
  overflow: hidden;
  padding: 0 15px;
  font-size: 13px;
  border: 1px solid #EBEBEB;
  margin: 0 auto 15px;
  height: 48px;
  line-height: 48px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
}
.log-inputb {
  width: 80px;
  overflow: hidden;
  padding: 0 15px;
  font-size: 13px;
  border: 1px solid #EBEBEB;
  margin: 0 auto 15px;
  height: 48px;
  line-height: 48px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
}
.log-input.warn {
  border: 1px solid #f88787
}
@-webkit-keyframes cloud1 {
  0% {
    left: 200px
  }
  100% {
    left: -130px;
  }
}
@keyframes cloud1 {
  0% {
    left: 200px
  }
  100% {
    left: -130px;
  }
}
@-webkit-keyframes cloud2 {
  0% {
    left: 500px;
  }
  100% {
    left: -90px;
  }
}
@keyframes cloud2 {
  0% {
    left: 500px;
  }
  100% {
    left: -90px;
  }
}
@-webkit-keyframes cloud3 {
  0% {
    left: 620px;
  }
  100% {
    left: -70px;
  }
}
@keyframes cloud3 {
  0% {
    left: 620px;
  }
  100% {
    left: -70px;
  }
}
@-webkit-keyframes cloud4 {
  0% {
    left: 100px;
  }
  100% {
    left: -70px;
  }
}
@keyframes cloud4 {
  0% {
    left: 100px;
  }
  100% {
    left: -70px;
  }
}
.dipl {
  display: flex;
}
.mima {
  margin-left: 50px;
  cursor: pointer;
}
.duanxin {
  margin: 0 100px;
  cursor: pointer;
}
.weixin {
  cursor: pointer;
}
.weixinma{
  margin-left: 100px;
}
</style>